1. Field of the Invention
The present invention relates to an image generator, and in particular to a computer image generator suitable for generating information in real time from which an image can be derived for display in for example a flight simulator.
2. Related Art
Real time image generators for flight simulators are used to simulate images which are presented to pilots who are positioned in a mock aircraft cockpit. The intended viewer of the image produced by the system, that is the simulator "pilot", looks out through an imaginary window into a three-dimensional (3-D) world defined by information stored as geometrical and other characteristic attribute data in a main database. A line drawn from the eyepoint through the window intersects a point in the 3-D world. The colour and intensity of that point must be "painted" on the window at the point of intersection of that line with the window.
The displayed image is made up from a series of picture elements (pixels) each of which is of uniform colour and intensity, the colour and intensity of each pixel being a function of the position of the eyepoint relative to the 3-D world which the stored data represents. In a real time display where hundreds of thousands of pixels must be updated sufficiently quickly to avoid jumping of the image, it is necessary to perform many millions of calculations per second to maintain image fidelity.
The position of the eyepoint, relative to the database changes over time in response to the manipulation of the flight controls of the simulated aircraft. At any point in time the simulator produces an output indicating the eyepoint position in world space coordinates, that is the coordinate system of the database, and indicating the viewing direction, that is a vector drawn from the pilot's eyepoint through the centre of the viewing window. The database stores data identifying the position and orientation of a large number of features that may contribute to the final image. The image generator calculates which of the features is visible for the given eyepoint, the position of the boundaries of the features relative to the viewing window, and the attributes such as colour and intensity of the visible features. Occultation of one feature by another must be taken into account, and in high quality systems the effects of one translucent feature occulting another must also be taken into account.
The content of the database is used to derive the colour and intensity information for each pixel of the image to be displayed on a screen placed in front of the simulator pilot. The centre of each pixel is on a unique predetermined imaginary viewing line extending from the eyepoint to the screen and notionally extending through the screen onto the surface of the model defined in the database. This means that the world space coordinate system of the database must be transformed using the eyepoint coordinates into a coordinate system having the eyepoint as its origin, that is an eyepoint space coordinate system, and the information must then be transformed from eyepoint space into a screen space coordinate system. The screen space coordinate system is two dimensional, having its origin at the centre of the display screen. These transformations enable the surface areas of the modelled features which determine the colour and intensity of each pixel (for which the screen space coordinates are known) to be determined. Once the features contributing to a particular pixel have been identified, the colour, intensity and other attributes of those features can be obtained from the database and appropriate calculations performed to determine the final displayed colour and intensity of the pixel.
If a high quality image is to be achieved, the final pixel colour and intensity must be based on a number of samples of the contributing features taken at sampling points distributed across each pixel. For each feature making a contribution to an image it is necessary to determine whether or not that feature overlaps each point in screen space corresponding to a sampling point. Thus it is fundamental to the operation of the image generator to be able to determine the boundaries of a feature in screen space relative to the position of each of a relative large number of sampling points.
In most known CIG systems, the world space model is defined as a series of polygonal features. Light point features can also be displayed in some systems. In the case of polygonal features, each polygon is described in the database by the world space coordinates of at least its vertices, and these geometrical attributes must be transformed into screen space coordinates to take account of the position and orientation of the eyepoint. This involves an initial world space to viewpoint space transformation, followed by a viewpoint space to screen space transformation. The transformations are computationally intensive operations but do enable realistic images to be displayed. In the case of a lightpoint feature, it may be described in the database by for example a position in world space. The position is transformed to screen space, and the feature can then be displayed on a circular area of the screen centred on the transformed position and having a radius corresponding to a computed size. Lightpoint features, providing they occupy only a relatively small area of screen space, can be adequately represented in this way as screen space circles. In the case of larger features which in world space are circular or elliptical, e.g. helipad markings, vehicle wheels, or fuel storage tanks, screen space circles or ellipses cannot provide image realism as correct perspective cannot be maintained.
The conventional approach to simulating the appearance of world space ellipses in screen space is to model each elliptical surface in the database as a multisided polygon defined with reference to world space coordinates. The greater the number of sides, the less apparent are the discontinuities alone the boundary of the ellipse. Thus, world space ellipses can be displayed in screen space using conventional techniques, but only at the expense of increasing the number of vertices/edges, each of which must be separately transformed to screen space coordinates and then processed to define its position relative to screen space sampling points. Increasing the number of vertices and edges to be processed increases the time taken to process one image using a given fixed computational resource. Thus in real time systems where there is a fundamental limit to the maximum acceptable time taken to produce one image it is highly undesirable to increase the number of polygon edges used in the model.
A review of the problems confronted in real time CIG systems and various approaches to solving these problems is given in the publication "Computer Image Generation", edited by Bruce J. Schachter, published by John Wiley & Sons Inc. 1983, ISBN 0-471-87287-3.